﻿using System;
using System.Windows;

namespace WP7Client.Helpers
{
    public static class GlobalHelper
    {
        public static String Url = "http://Lars-VAIO:1337/";
        //public static String Url = "http://glenn-laptop:1337/";
        //public static String Url = "http://laptopnik:1337/";
        //public static String Url = "http://83.85.182.120:1337/";
        //public static String Url = "http://menno-laptop:1337/";

        public static Boolean IsConnected = true;
        public static Boolean AppStarted = false;

        /// <summary>
        /// Retouneerd een md5 hash van de input string.
        /// </summary>
        /// <param name="input">te hashen string</param>
        /// <returns>de gehashde string</returns>
        public static string MD5(string input)
        {
            return MD5Core.GetHashString(input);
        }

        /// <summary>
        /// Laat een messagebox zien.
        /// </summary>
        /// <param name="caption">Titel</param>
        /// <param name="message">Bericht</param>
        public static void ShowMessage(String caption, String message)
        {
            System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                MessageBox.Show(message, caption, MessageBoxButton.OK);
            });
        }
    }
}
